<?php
/**
 * Smarty plugin
 * 
 * $Id: modifier.call.php 121 2010-05-28 07:57:29Z Administrator $
 * $Revision: 121 $
 * $Author: Administrator $
 * $Date: 2010-05-28 15:57:29 +0800 (星期五, 28 五月 2010) $
 * @package fastlib
 * @subpackage smarty
 */
/**
 * Smarty call modifier plugin
 *
 * Type:     modifier<br>
 * Name:     call<br>
 * Date:     APr 24, 2009
 * Purpose:  call a function in smarty
 * @author   glzaboy <iceer.coffee@gmail.com>
 * @version 1.0
 * @param string function
 */
function smarty_modifier_call($func) {
	$args = func_get_args ();
	array_shift ( $args );
	$pos = strpos ( $func, ':' );
	if (false === $pos) {
		return call_user_func_array ( $func, $args );
	} else {
		call_user_func_array ( substr ( $func, 0, $pos ), $args );
		return '';
	}
}